#pragma once
#include "vn/Console.h"
#include <iostream> // std:cin

void ConsoleTestRead() {_test_func_;
	// Console::Read
	{
		Char c;
		UChar uc;
		Short s;
		UShort us;
		Int i;
		UInt ui;
		Long l;
		ULong ul;
		Int64 i64;
		UInt64 ui64;
		float f;
		double d;
		long double ld;
		WChar w;
		bool b;
		String str;
		char buf[5];

//		std::cin >> c;
//		std::cin >> uc;
//		std::cin >> s;
//		std::cin >> us;
//		std::cin >> i;
//		std::cin >> ui;
//		std::cin >> l;
//		std::cin >> ul;
//		std::cin >> i64;
//		std::cin >> ui64;
//		std::cin >> f;
//		std::cin >> d;
//		std::cin >> ld;
////		std::cin >> w;
//		std::cin >> b;
////		std::cin >> str;
//		std::cin >> buf;

//		Console::Read(c);	assert(c == '1');
//		Console::Read(uc);	assert(uc == '2');
//		Console::Read(s);	assert(s == 3);
//		Console::Read(us);	assert(us == 4);
//		Console::Read(i);	assert(i == 5);
//		Console::Read(ui);	assert(ui == 6);
//		Console::Read(l);	assert(l == 7);
//		Console::Read(ul);	assert(ul == 8);
//		Console::Read(i64);	assert(i64 == 9);
//		Console::Read(ui64);assert(ui64 == 0);
//		Console::Read(f);	assert(f == 1);
//		Console::Read(d);	assert(d == 2);
//		Console::Read(ld);	assert(ld == 3);
//		Console::Read(w);	assert(w == L'4');
//		Console::Read(b);	assert(b == true);
//		Console::Read(str);	// assert(str == 1);
//		Console::Read(buf);	// assert(c == 1);

		//Console::WriteLine(c);
		//Console::WriteLine(uc);
		//Console::WriteLine(s);
		//Console::WriteLine(us);
		//Console::WriteLine(i);
		//Console::WriteLine(ui);
		//Console::WriteLine(l);
		//Console::WriteLine(ul);
		//Console::WriteLine(i64);
		//Console::WriteLine(ui64);
		//Console::WriteLine(f);
		//Console::WriteLine(d);
		//Console::WriteLine(ld);
		//Console::WriteLine(w);
		//Console::WriteLine(b);
		//Console::WriteLine(str);
		//Console::WriteLine(buf);



		//Console::Read<char>();
		//Console::Read<short>();
		//Console::Read<int>();
		//Console::Read<long>();
		//Console::Read<__int64>();
		//Console::Read<float>();
		//Console::Read<double>();
		//Console::Read<long double>();
		//Console::Read<wchar_t>();
//		Console::Read<void *>();
	}
}

void ConsoleTest() {_test_func_;
	ConsoleTestRead();


#if 0
	Int64	x;
	double	y;
	Console::Write("Nhap interger x = ");
	Console::Read(x);	// nhap sai khong thay bao loi
	Console::Write("Nhap float y = ");
	Console::Read(y);

	// cai thien performance cua stringbuilder
	StringBuilder ss;
	ss << x << "^" << y << "  = " << Math::Pow(x, y);	// Math::Pow bao loi ntn?

	Console::WriteLine("Ta co cong thuc: " + ss.ToString());
	Console::WriteLine("Tam biet...");
	Console::ReadKey();
	// Console::KeyPressed();
#endif
}

